/**
 * Copyright (C) 2017 - 2020 https://github.com/joewee
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.workflow.order;

import com.bifrost.entity.Order;
import com.bifrost.exception.WorkflowException;
import com.bifrost.workflow.DefaultProcessContextImpl;
import com.bifrost.workflow.ProcessContext;
import com.bifrost.workflow.ProcessContextFactory;
import org.springframework.stereotype.Component;

/**
 *订单后续处理流程
 *
 *@author joewee
 *@version 1.0.0
 *@Date 2018/3/22 11:52
 */
@Component
public class OrderProcessContextFactory implements ProcessContextFactory<Order, Order> {

    @Override
    public ProcessContext<Order> createContext(Order seedData) throws WorkflowException {
        ProcessContext<Order> context = new DefaultProcessContextImpl<>();
        context.setSeedData(seedData);

        return context;
    }
}
